1. Field of the Invention
The present invention generally relates to graphics processing and more specifically to compression of color data.
2. Description of the Related Art
Conventional graphics processors use compression to reduce the bandwidth needed to access the color data stored in the frame buffer. Some forms of compression operate on tiles that include color data for several pixels. When the color data for multiple sub-pixel samples within a pixel or multiple pixels within a tile are compressed, visual artifacts may be introduced. For example, assume a tile includes a blue background and a red primitive that partially covers the tile. The color data for the tile is compressed by combining the color data to produce a purple color for the pixels along the edge where the red primitive overlaps the blue background and the compressed color data is written to memory. Visual artifacts are introduced when a second red primitive is received that covers the remaining portion of the tile. The compressed color data is read from memory and combined with the second red primitive to produce compressed color data that is reddish-purple along the edge. The final compressed color along the edge should be red, but instead the final compressed color along the edge is reddish-purple. None of the purple background color should be included in the final compressed color. The visual artifacts may appear as cracks at primitive edges in meshes.
Accordingly, what is needed in the art is a system and method for compressing color data without introducing visual artifacts.